window.addEventListener('load', (e) => {
	let focus = document.querySelector('.Zzg_LunBoTu_List');
	let ol = document.querySelector('ol');
	let ul = focus.children[0];
	let w = focus.offsetWidth;
	// console.log(w);

	let index = 0;
	let timer = setInterval(() => {
		index++;
		let translatex = -w * index;
		ul.style.transition = 'all .3s';
		ul.style.transform = 'translateX(' + translatex + 'px)';
	}, 2000)

	ul.addEventListener('transitionend', (e) => {
		if (index >= 4) {
			index = 0;
			// console.log(index);
			ul.style.transition = 'none';
			let translatex = -w * index;
			ul.style.transform = 'translateX(' + translatex + 'px)';
		} else if (index < 0) {
			index = 2;
			// console.log(index);
			ul.style.transition = 'none';
			let translatex = -w * index;
			ul.style.transform = 'translateX(' + translatex + 'px)';
		}
		
		ol.querySelector('.current').classList.remove('current');
		ol.children[index].classList.add('current');
		
	})
})
